#include<stdio.h>
#include<stdlib.h>
#include<iostream>
using namespace std;

int main(){
    char weekday[][10]={"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"};
    char (*p)[10]=weekday;//定义数组指针指向weekday
    int a; 
    cin>>a;
    puts(*(p+(a-1)));
    cout<<*(p[0]+1)<<*(*(p+0)+1);
    return 0;
}